package com.zpark.cloud.alibaba.feign;

import com.zpark.cloud.alibaba.entity.Dept;
import com.zpark.cloud.alibaba.feign.impl.DeptFeignImpl;
import com.zpark.cloud.alibaba.utils.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @PackageName: com.zpark.cloud.alibaba.feign
 * @ClassName: IDeptFeign
 * @Description:
 * @author: RZS
 * @date: 2023/6/21  15:39
 */
@FeignClient(value = "${service-url.nacos-provider-service}", fallback = DeptFeignImpl.class)
public interface IDeptFeign {

    @GetMapping("/dept/find_by_id/{id}")
    public ResponseResult<Dept> findById(@PathVariable("id") Integer id);

    @GetMapping("/dept/find_all")
    public ResponseResult<List<Dept>> findAll();
}
